package dominion.model.actions.base;

import java.util.List;

import dominion.model.Card;
import dominion.model.GameBoard;
import dominion.model.Player;
import dominion.model.actions.Action;
import dominion.utils.Constants;

public class Market extends Action {

	public Market() {
		this.cost = 5;
	}

	@Override
	public Card clone() {
		return new Market();
	}

	@Override
	public String toString() {
		return Constants.MARKET;
	}

	@Override
	public String getDescription() {
		StringBuffer sb = new StringBuffer();
		sb.append(super.getDescription());
		sb.append("+1 action, +1 card, +1 buy, +$1\n");
		return sb.toString();
	}

	@Override
	public void doAction(Player player, GameBoard board, List<Player> players) {
		player.drawCard();
		player.changeBuys(1);
		player.changeMoney(1);
		playedCard(player);
		Constants.printer.print("New hand:");
		Constants.printer.print(player.printHand());
	}
}
